#include<iostream>
class Test
{
    public:
        Test(){}
        ~Test(){}
    void show()
    {

        std::cout<<"hello world"<<std::endl;
    }
    

};
class SmartPoint
{
public:
    SmartPoint(Test*t):t(t){}
    ~SmartPoint()
    {
        delete t;
    }
    Test*operator ->()
    {
        return t;
    }
    Test& operator*()
    {
        return*t;
    }

private:
Test*t;

};

int main()
{
    SmartPoint p(new Test);
    (*p).show();
    return 0;



}